home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
016a
/
progs.zip
/
PROGS.DOC
< prev
next >
Wrap
Text File
|
1991-09-16
|
9KB
|
244 lines
PROGS
Copyright (C) 1991, Chris Scullion
CIS: 70242,2147
internet: cscullio@ncratl.atlantaga.ncr.com
1.0 INTRODUCTION
-----------------
PROGS is a simple menuing program that allows execution of a program at the
press of a single button. The menu can be color-coded to suit your needs,
command line arguments can be optionally specified, and a 'pause after
program end' feature can be configured. There is also a built-in screen saver
which blanks the screen if the menu has been inactive for 10 minutes. This
program is perfect for:
- creating an easy to use program list for children
- creating a list of online documentation available for viewing
- creating a tree structured execution list for complex systems
The program uses very little memory to minimize negative effects on large
programs. The goal is to keep the memory utilization below 24K for this
and all future version of the program.
2.0 PACKAGING
--------------
PROGS is packaged with three files:
- PROGS.EXE -- the program itself
- PROGS.CFG -- a sample configuration file
- PROGS.DOC -- this documentation file
PROGS.EXE looks for the file PROGS.CFG in the current directory at startup
time. PROGS.CFG contains all details about the programs to appear in the
menu.
3.0 CONFIGURATION
------------------
The format of the PROGS.CFG file is very rigid and important. Very little
program space is used for error detection while reading this file, so careful
attention to this format is vital.
3.1 LINE 1
-----------
The first line of PROGS.CFG contains the title of the menu as it appears on
the screen. The sample file shows this as 'Program List ...'. Note the
trailing blanks on this line. PROGS appends a four digit error code to the
end of this line when it displays it on the screen. The spaces can be used
to position the error code on the right side of the menu display, if you so
desire.
3.2 LINE 2
-----------
The second line of PROGS.CFG contains a list of eight (8) space-separated
numbers. These numbers represent, in order:
- foreground color
- background color
- menu item color 1
- menu item color 2
- menu item color 3
- menu item color 4
- menu item color 5
- menu item color 6
The color numbers are coded as follows:
Black 0
Red 1
Green 2
Yellow 3
Blue 4
Magenta 5
Cyan 6
White 7
LightRed 11
LightGreen 12
LightYellow 13
LightBlue 14
LightMagenta 15
LightCyan 16
LightWhite 17
Note that you can add blinking to any color by adding 128 (e.g., blinking
white would be 128 + 7 = 135).
3.3 REMAINING LINES
--------------------
The remaining lines of PROGS.CFG are grouped in threes, three lines per
menu item. There is a limit of twenty (20) menu items. Any lines after the
twentieth menu item are ignored by PROGS. The first line of the group of
three lines is the description of the menu item as it should appear on the
menu. There is a limit of sixty (60) characters on this (and all)
configuration line. There are three special characters which can precede your
menu item description. The characters and their effects are:
- '$' -- causes a color change beginning with this menu item
- '#' -- causes PROGS to prompt for additional command line parameters if
this menu item is selected
- '%' -- causes PROGS to prompt for a keypress upon completion of the
program associated with this menu item
Note that any combination of these may appear on a single description line.
For example:
$#My menu item
will cause a color change starting with this item AND will cause PROGS to
prompt for additional user parameters. PROGS strips these characters from
the description before displaying the item on the menu.
The second line in the group of three is the executable file to run when the
menu item is selected. This must be a program which can be executed, not
a batch file. Batch files CAN be associated with menu items by using the
following configuration line:
\dos\command.com /cmybatch.bat
where 'mybatch.bat' is the batch file to execute and '\dos\command.com' is
the filename of your command processor.
Command line arguments may follow the program name, but remember that there is
a 60 character limit for the configuration line.
You may or may not wish to supply a full path name for the executable file.
A full path name is not necessary if:
- the program is locatable in the PATH (environment variable)
- the program's directory is specified as the working directory (see below)
The third line of the three is the working directory. PROGS will switch to this
directory BEFORE executing the program specified on the second line. PROGS
records the current directory before switching, and restores it upon
completion of the executed program. Note that if you don't care what the
working directory is, or you want the same directory as PROGS.EXE, specify
the current directory '.'.
A complete menu item configuration group would appear as follows:
My menu description
\mydir\myprog.exe -option1 -option2
.
4.0 USAGE
----------
PROGS presents a color coded menu to the user. Each line of the menu contains
a letter and a description. The description is the text description specified
in the configuration file. To activate a menu choice, press the letter
corresponding to the menu item. If the menu item has been configured for
additional user parameters (the '#' option), a line appears at the bottom
of the menu, prompting the user to enter parameters:
Enter additional arguments:
Type the filename or other arguments to be used in the execution of the program
and press <Enter>.
To exit the menu (and the PROGS program), press <Esc> when the menu is
displayed. Once a menu letter has been pressed, there is no provision for
cancellation.
The menu reappears after the selected program terminates, unless the '%'
option is specified for that menu item in the configuration file. In this
case, PROGS prompts:
Press <Enter> to continue...
To return to the PROGS menu, press the <Enter> key.
After 10 minutes of inactivity in the menu, PROGS will blank the screen. To
restore the screen, press <space> or any selection letter.
5.0 HINTS AND TIPS
-------------------
I use PROGS to maintain a list of online documentation. Since I like to have
documentation associated with a program in the same directory as the program,
it is inconvenient to find documentation for a specific utility using an
editor. You need to remember the path name and file name of the documentation
and type it in to your editor or viewer. With PROGS, each menu item can be
a document, with the program to execute being you favorite file viewer or
editor. For example, here's a possible documentation configuration file:
Online Documentation
7 0 9 10 11 12 13 14
Emacs user's guide
\dos\viewer.exe emacs.doc
\emacs
$FAX instructions
\dos\viewer.exe fax.txt
\fax
$Phone list
\dos\viewer.exe phone.lst
\personal
You can nest PROGS within itself by putting a new PROGS.CFG in a separate
directory. For instance suppose there was a directory called '\DOCS' with the
above PROGS.CFG in it. In the root directory (or anywhere else, for that
matter) is a copy of PROGS.EXE and an associated PROGS.CFG with the following
contents:
Main Program List
7 0 9 10 11 12 13 14
#WordPerfect
\wp51\wp.exe
\
WordPerfect, Project Files
\wp51\wp.exe
\project
$Online Documentation <---
\progs.exe <---
\docs <---
Games
\progs.exe
\games
$Windows
win.com
\windows
6.0 THE PITCH
--------------
PROGS is SHAREWARE. You know the routine, send me $10.00 if you decide to use
it (or just to be nice). MORE IMPORTANTLY, tell me what I can do to improve
PROGS. I use it all the time, so I may be 'too close' to it to see where it
could use some changing. Keep in mind that the low memory utilization is a
limit I'd like to honor. The program takes about 16K now, so that leaves room
for about 8K of improvement. I'll keep a mailing list of all registered users
and send out notices of new versions (or new programs) as they become available
(so include your address).
Chris Scullion
304 Hickory View Drive
Lawrenceville, GA 30245
CIS: 70242,2147
internet: cscullio@ncratl.atlantaga.ncr.com